package com.hzqy.persistence.dao.plan;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.CmContentVo;
import com.hzqy.web.vo.UserPlanVo;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class UserPlanDao extends PersistenceDao<UserPlanVo,Integer> {
    public int insertUserPlan(UserPlanVo userPlanVo){
        return getSqlSession().insert(getNamespace()+"insertUserPlan",userPlanVo);
    }

    public int updateStatusById(UserPlanVo userPlanVo){
        return getSqlSession().update(getNamespace()+"updateStatusById",userPlanVo);
    }

    public List<CmContentVo> selectUserPlanList(Map<String,Object> map){
        return getSqlSession().selectList(getNamespace()+"selectUserPlanList",map);
    }

    public CmContentVo selectCmContentVoByPlanCondition(CmContentVo cmContentVo){
        return getSqlSession().selectOne(getNamespace()+"selectCmContentVoByPlanCondition",cmContentVo);
    }

    public CmContentVo selectUserPlanById(Map<String,Object> map){
        return getSqlSession().selectOne(getNamespace()+"selectUserPlanById",map);
    }

    public UserPlanVo selectUserPlan(Map<String,Object> map){
        return getSqlSession().selectOne(getNamespace()+"selectUserPlan",map);
    }
}
